]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
telepathyClient: don't update notifications for outgoing messages
authorJonny Lamb <jonnylamb@gnome.org>
Sun, 15 May 2011 09:07:23 +0000 (10:07 +0100)
committerJonny Lamb <jonnylamb@gnome.org>
Wed, 18 May 2011 07:26:57 +0000 (08:26 +0100)
If you receive a message, a notification will appear. If you reply in
Empathy's chat window before the notification disappears, the
notification is updated with the contents of the message you *just*
sent! We should only update notifications if they're incoming.

https://bugzilla.gnome.org/show_bug.cgi?id=650219

Signed-off-by: Jonny Lamb <jonnylamb@gnome.org>
js/ui/telepathyClient.js

index 252b2661f809403d0d4ad08615b8679bf74f4ccb..18f4f88d7b54d2f75a99b2ccc5adbcf13f348127 100644 (file)
@@ -411,7 +411,11 @@ Notification.prototype = {
             styles.push('chat-action');
         }
 
-        this.update(this.source.title, messageBody, { customContent: true, bannerMarkup: true });
+        if (message.direction == NotificationDirection.RECEIVED) {
+            this.update(this.source.title, messageBody, { customContent: true,
+                                                          bannerMarkup: true });
+        }
+
         this._append(messageBody, styles, message.timestamp, noTimestamp);
     },